﻿using Blog.System.TooklKits.Base;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace Blog.System.Authorize
{
    public interface IAuthorizeService
    {
        /// <summary>
        /// 获取登录地址
        /// </summary>
        /// <returns></returns>
        Task<ServiceResult<string>> GetLoginAddressAsync();

        /// <summary>
        /// 获取AccessToken
        /// </summary>
        /// <returns></returns>
        Task<ServiceResult<string>> GetAccessTokenAsync(string code);

        /// <summary>
        /// 登录成功，生成Token
        /// </summary>
        /// <returns></returns>
        Task<ServiceResult<string>> GenerateTokenAsync(string access_token);

        /// <summary>
        /// 生成通用token
        /// </summary>
        /// <returns></returns>
        ServiceResult<string> GetAdminToken();

    }
}
